package com.hyd.hx_adr.exception;

/**
 * 业务异常类
 */
public class BusinessException extends RuntimeException {

    /**
     * 业务异常信息
     */
    private String message;

    /**
     * 业务异常状态
     */
    private Integer status;

    /**
     * 业务异常状态码
     */
    private Integer code;

    /**
     * 成功状态
     */
    private boolean success;

    public BusinessException(String message) {
        this.message = message;
        this.status = 105;
        this.code = -1;
        this.success = false;
    }

    public BusinessException(String message, Integer status, Integer code) {
        this.message = message;
        this.status = status;
        this.code = code;
        this.success = false;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }
}
